Skip to main content

All Questions

2votes
2answers
802views

How to add validation for a list in a ViewModel

I have the following ViewModel: public class InvitationViewModel { public int id { get; set; } public string InvitationName { get; set; } public string Type { get; set; } public ...
Chris's user avatar
1vote
1answer
475views

Entity framework code first data annotation not working

Hi I am using entity framework code first approach for my project. i have a class called Login as shown below public class Login { [Required(ErrorMessage = "UserName Required")] [DisplayName(...
user3894583's user avatar
2votes
2answers
967views

Image upload with validation on EF Code First models

I could've sworn this should've been answered a million times before, but I've come up empty after searching for quite a while. I have a view that is bound to an object. This object should have an ...
Inrego's user avatar
  • 1,533
1vote
2answers
2kviews

ModelState.IsValid = true for not valid model

I have view for adding very simple objects: @Html.ValidationSummary(true) @using (Html.BeginForm()) { <div class="editor-label"> @Html.LabelFor(tag => tag.Name) </div> ...
deha's user avatar
  • 815

close